package com.ncmmall.domain.business.cloudstore;

import com.ncmmall.domain.business.goods.Goods;
import com.ncmmall.domain.business.goods.sku.GoodsSku;
import com.ncmmall.domain.security.user.WebUser;
import lombok.Getter;
import lombok.Setter;

import javax.persistence.*;
import java.sql.Timestamp;

/**
 * @author linxs
 * @Description: 云仓商品
 * @Date: 2020-05-18 20:58
 */
@Entity
@Table(name = "mall_cloud_store_goods")
@Access(AccessType.FIELD)
@Getter
@Setter
public class CloudStoreGoods {

    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private long id;

    /**
     * 所属商家
     */
    @OneToOne
    private WebUser merchant;

    /**
     * 所属供应商
     */
    @OneToOne
    private WebUser supplier;

    /**
     * 关联商品
     */
    @OneToOne
    private Goods goods;

    /**
     * 关联SKU
     */
    @OneToOne
    private GoodsSku sku;

    /**
     * 数量
     */
    private int quantity;

    /**
     * 时间
     */
    private Timestamp createTime;

    /**
     * 状态
     * 1、在仓
     * 2、空仓
     */
    private int status;

}
